package com.kara.woodAgent.agent.graph;

import com.kara.woodAgent.agent.graph.communicate.ChannelMessage;
import com.kara.woodAgent.agent.graph.communicate.ChannelPayload;
import com.kara.woodAgent.agent.graph.communicate.StepImage;
import dev.langchain4j.model.chat.response.ChatResponse;
import lombok.Builder;
import lombok.Data;

import java.util.function.BiConsumer;
import java.util.function.BiFunction;
import java.util.function.Consumer;
import java.util.function.Function;

/**
 * @author tzy
 * @version 1.0
 * @project wood_agent
 * @description
 * @date 2025/6/4 13:13:04
 */
public interface RunningGraph<T extends GraphContext> {

	boolean checking();

	StepImage<T> image();

	RunningGraph<T> then(Consumer<String>consumer);

	RunningGraph<T> listen(String event,Function<ChannelPayload, ChannelMessage> func);

	RunningGraph<T> communicate(BiFunction<String, ChannelPayload, ChannelMessage> function);

	void start();
}
